from db import db
from db import BaseFul
from db.songs.songs import Song
from db.songs_list.song_list import SongList


class Song_List_Song(BaseFul):
    song_id = db.Column(db.ForeignKey(Song.id, ondelete='set null'))
    song = db.relationship(Song, primaryjoin='Song_List_Song.song_id==Song.id', backref='song_list_song')
    songlist_id = db.Column(db.ForeignKey(SongList.id, ondelete='set null'))
    songlist = db.relationship(SongList, primaryjoin='Song_List_Song.songlist_id==SongList.id',
                               backref='song_list_song')
